<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GThemedIcon</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="icons.html" title="Icons">
<link rel="prev" href="GLoadableIcon.html" title="GLoadableIcon">
<link rel="next" href="GEmblemedIcon.html" title="GEmblemedIcon">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GLoadableIcon.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="icons.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="GEmblemedIcon.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GThemedIcon.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GThemedIcon.description" class="shortcut">Description</a>
                   | 
                  <a href="#GThemedIcon.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GThemedIcon.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#GThemedIcon.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="GThemedIcon"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GThemedIcon.top_of_page"></a>GThemedIcon</span></h2>
<p>GThemedIcon — Icon theming support</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GThemedIcon.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

                    <a class="link" href="GThemedIcon.html#GThemedIcon-struct" title="GThemedIcon">GThemedIcon</a>;
<a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *             <a class="link" href="GThemedIcon.html#g-themed-icon-new" title="g_themed_icon_new ()">g_themed_icon_new</a>                   (<em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);
<a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *             <a class="link" href="GThemedIcon.html#g-themed-icon-new-from-names" title="g_themed_icon_new_from_names ()">g_themed_icon_new_from_names</a>        (<em class="parameter"><code><span class="type">char</span> **iconnames</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> len</code></em>);
<a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *             <a class="link" href="GThemedIcon.html#g-themed-icon-new-with-default-fallbacks" title="g_themed_icon_new_with_default_fallbacks ()">g_themed_icon_new_with_default_fallbacks</a>
                                                        (<em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GThemedIcon.html#g-themed-icon-prepend-name" title="g_themed_icon_prepend_name ()">g_themed_icon_prepend_name</a>          (<em class="parameter"><code><a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GThemedIcon.html#g-themed-icon-append-name" title="g_themed_icon_append_name ()">g_themed_icon_append_name</a>           (<em class="parameter"><code><a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);
const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const * <a class="link" href="GThemedIcon.html#g-themed-icon-get-names" title="g_themed_icon_get_names ()">g_themed_icon_get_names</a>           (<em class="parameter"><code><a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> *icon</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GThemedIcon.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GThemedIcon
</pre>
</div>
<div class="refsect1">
<a name="GThemedIcon.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GThemedIcon implements
 <a class="link" href="GIcon.html" title="GIcon">GIcon</a>.</p>
</div>
<div class="refsect1">
<a name="GThemedIcon.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GThemedIcon.html#GThemedIcon--name" title='The "name" property'>name</a>"                     <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Write / Construct Only
  "<a class="link" href="GThemedIcon.html#GThemedIcon--names" title='The "names" property'>names</a>"                    <a href="./../gobject/gobject/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a>                 : Read / Write / Construct Only
  "<a class="link" href="GThemedIcon.html#GThemedIcon--use-default-fallbacks" title='The "use-default-fallbacks" property'>use-default-fallbacks</a>"    <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="GThemedIcon.description"></a><h2>Description</h2>
<p>
<a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> is an implementation of <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> that supports icon themes.
<a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> contains a list of all of the icons present in an icon
theme, so that icons can be looked up quickly. <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> does
not provide actual pixmaps for icons, just the icon names.
Ideally something like <a href="http://library.gnome.org/devel/gtk3/GtkIconTheme.html#gtk-icon-theme-choose-icon"><code class="function">gtk_icon_theme_choose_icon()</code></a> should be used to
resolve the list of names so that fallback icons work nicely with
themes that inherit other themes.
</p>
</div>
<div class="refsect1">
<a name="GThemedIcon.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GThemedIcon-struct"></a><h3>GThemedIcon</h3>
<pre class="programlisting">typedef struct _GThemedIcon GThemedIcon;</pre>
<p>
An implementation of <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> for themed icons.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-themed-icon-new"></a><h3>g_themed_icon_new ()</h3>
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *             g_themed_icon_new                   (<em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);</pre>
<p>
Creates a new themed icon for <em class="parameter"><code>iconname</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em> :</span></p></td>
<td>a string containing an icon name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-themed-icon-new-from-names"></a><h3>g_themed_icon_new_from_names ()</h3>
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *             g_themed_icon_new_from_names        (<em class="parameter"><code><span class="type">char</span> **iconnames</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre>
<p>
Creates a new themed icon for <em class="parameter"><code>iconnames</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconnames</code></em> :</span></p></td>
<td>an array of strings containing icon names. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the length of the <em class="parameter"><code>iconnames</code></em> array, or -1 if <em class="parameter"><code>iconnames</code></em> is
<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-themed-icon-new-with-default-fallbacks"></a><h3>g_themed_icon_new_with_default_fallbacks ()</h3>
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *             g_themed_icon_new_with_default_fallbacks
                                                        (<em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);</pre>
<p>
Creates a new themed icon for <em class="parameter"><code>iconname</code></em>, and all the names
that can be created by shortening <em class="parameter"><code>iconname</code></em> at '-' characters.
</p>
<p>
In the following example, <em class="parameter"><code>icon1</code></em> and <em class="parameter"><code>icon2</code></em> are equivalent:
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="keyword">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">names</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> </span><span class="cbracket">{</span><span class="normal"> </span>
<span class="normal">  </span><span class="string">"gnome-dev-cdrom-audio"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"gnome-dev-cdrom"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"gnome-dev"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"gnome"</span>
<span class="cbracket">}</span><span class="symbol">;</span>

<span class="normal">icon1 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GThemedIcon.html#g-themed-icon-new-from-names">g_themed_icon_new_from_names</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">names</span><span class="symbol">,</span><span class="normal"> </span><span class="number">4</span><span class="symbol">);</span>
<span class="normal">icon2 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GThemedIcon.html#g-themed-icon-new-with-default-fallbacks">g_themed_icon_new_with_default_fallbacks</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"gnome-dev-cdrom-audio"</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em> :</span></p></td>
<td>a string containing an icon name</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-themed-icon-prepend-name"></a><h3>g_themed_icon_prepend_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_themed_icon_prepend_name          (<em class="parameter"><code><a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);</pre>
<p>
Prepend a name to the list of icons from within <em class="parameter"><code>icon</code></em>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Note that doing so invalidates the hash computed by prior calls
to <a class="link" href="GIcon.html#g-icon-hash" title="g_icon_hash ()"><code class="function">g_icon_hash()</code></a>.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
<td>a <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em> :</span></p></td>
<td>name of icon to prepend to list of icons from within <em class="parameter"><code>icon</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="g-themed-icon-append-name"></a><h3>g_themed_icon_append_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_themed_icon_append_name           (<em class="parameter"><code><a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *iconname</code></em>);</pre>
<p>
Append a name to the list of icons from within <em class="parameter"><code>icon</code></em>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Note that doing so invalidates the hash computed by prior calls
to <a class="link" href="GIcon.html#g-icon-hash" title="g_icon_hash ()"><code class="function">g_icon_hash()</code></a>.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
<td>a <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iconname</code></em> :</span></p></td>
<td>name of icon to append to list of icons from within <em class="parameter"><code>icon</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-themed-icon-get-names"></a><h3>g_themed_icon_get_names ()</h3>
<pre class="programlisting">const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const * g_themed_icon_get_names           (<em class="parameter"><code><a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a> *icon</code></em>);</pre>
<p>
Gets the names of icons from within <em class="parameter"><code>icon</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
<td>a <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a list of icon names. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GThemedIcon.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GThemedIcon--name"></a><h3>The <code class="literal">"name"</code> property</h3>
<pre class="programlisting">  "name"                     <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Write / Construct Only</pre>
<p>
The icon name.
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GThemedIcon--names"></a><h3>The <code class="literal">"names"</code> property</h3>
<pre class="programlisting">  "names"                    <a href="./../gobject/gobject/gobject-Boxed-Types.html#GStrv"><span class="type">GStrv</span></a>                 : Read / Write / Construct Only</pre>
<p>
A <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of icon names.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GThemedIcon--use-default-fallbacks"></a><h3>The <code class="literal">"use-default-fallbacks"</code> property</h3>
<pre class="programlisting">  "use-default-fallbacks"    <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>
Whether to use the default fallbacks found by shortening the icon name
at '-' characters. If the "names" array has more than one element, 
ignores any past the first.
</p>
<p>
For example, if the icon name was "gnome-dev-cdrom-audio", the array 
would become
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
<span class="normal">  </span><span class="string">"gnome-dev-cdrom-audio"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"gnome-dev-cdrom"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"gnome-dev"</span><span class="symbol">,</span>
<span class="normal">  </span><span class="string">"gnome"</span><span class="symbol">,</span>
<span class="normal">  <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span>
<span class="cbracket">}</span><span class="symbol">;</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="GThemedIcon.see-also"></a><h2>See Also</h2>
<a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>, <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>